<template>
    <div>
        <Indicator 
            v-for="(item, index) in indicators" 
            :key="item.key" v-bind:index="index" 
            v-bind:events="events" 
            v-bind:indicators="indicators" 
            v-bind:properties="properties" 
            v-bind:measures="measures"
            v-bind:datasourceId="datasourceId"></Indicator>
    </div>


</template>

<script>
    import Indicator from "./Indicator";
    export default {
        name: "IndicatorGroup",
        components: {Indicator},
        props: {
            properties: Array,
            indicators: Array,
            events: Array,
            measures: Array,
            datasourceId: Number
        },
        data: function() {
            return {}
        },
        methods: {
            addItem: function() {
                this.indicators.push({
                    key: Math.random().toString(36).substr(2),
                    event: "",
                    measure: [],
                    filter: null
                })
            },
            removeItem: function(index) {
                this.indicators.splice(index, 1);
            }
        },
        created: function() {}
    }
</script>